<template>
		<page-loading :show="canshowing" mode='if'>
		<view class="main">
			<view class="wrap" v-if="this.identity === 'Factory'">
				<view class="page-box">
					<view class="nav-status">
						<u-subsection
							class="mt-20"
							:list="inquiryStatusTitleList"
							bgColor="#fff"
							active-color="#FBB000"
							@change="sectionChange"
							:bold="false"
							:current="quotation"
						></u-subsection>
					</view>
					<u-loadmore v-if="orderList.length > 0" :status="loadStatus[loadStatusId]" bgColor="#f2f2f2"></u-loadmore>
				</view>
			</view>
			<view class="wrap" v-else>
				<view class="u-tabs-box"  >
					<u-tabs-swiper
						height="90"
						bar-width="120"
						activeColor="#FBB000"
						ref="tabs"
						:list="list"
						:current="current"
						@change="change"
						:is-scroll="false"
						swiperWidth="750"
					></u-tabs-swiper>
				</view>
			
				<swiper class="swiper-box" :duration="300" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" @change="orderListchange">
					<swiper-item class="swiper-item">
						<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="$u.throttle(reachBottom, 500)">
							<view class="page-box">
								<view class="nav-status">
									<u-subsection
										class="mt-20"
										:list="inquiryStatusTitleList"
										bgColor="#fff"
										active-color="#FBB000"
										@change="sectionChange"
										:bold="false"
										:current="inquiryCurrent"
									></u-subsection>
									<list tab="0" v-if="current === 0" :listType="goInPage" :datalist="orderList" @handleOrder="handleOrder"></list>
								</view>
								<u-loadmore v-if="orderList.length > 0" :status="loadStatus[loadStatusId]" bgColor="#f2f2f2"></u-loadmore>
							</view>
						</scroll-view>
					</swiper-item>
					<swiper-item class="swiper-item">
						<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="$u.throttle(reachBottom, 500)">
							<view class="page-box">
								<view class="nav-status">
									<u-subsection
										class="mt-20"
										:list="inquiryStatusTitleList"
										bgColor="#fff"
										active-color="#FBB000"
										@change="sectionChange"
										:bold="false"
										:current="retailCurrent"
									></u-subsection>
									<list tab="1" v-if="current === 1" :listType="goInPage" :datalist="orderList" @handleOrder="handleOrder"></list>
								</view>
								<u-loadmore v-if="orderList.length > 0" :status="loadStatus[loadStatusId]" bgColor="#f2f2f2"></u-loadmore>
							</view>
						</scroll-view>
					</swiper-item>

					<swiper-item class="swiper-item">
						<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="$u.throttle(reachBottom, 500)">
							<view class="page-box">
								<view class="nav-status pad1p">
									<template>
										<view></view>
									</template>
									<u-subsection
										class="mt-20 border-bottom-1"
										:list="tabLabelList"
										bgColor="#fff"
										active-color="#FBB000"
										@change="RetailChange"
										:bold="false"
										:current="retail"
									></u-subsection>
									<!-- <u-subsection class="mt-20 border-bottom-1" v-else :list="RetailListNoFindCar" bgColor='#fff' active-color="#FBB000" @change="RetailChange" :bold='false' :current="retail"></u-subsection> -->
									<u-subsection
										class="secordfloor"
										v-show="retail === 0"
										:list="RetailStatusList[0]"
										bgColor="#fff"
										active-color="#FBB000"
										@change="RetailStatusChange"
										:bold="false"
										:current="redetail"
									></u-subsection>
									<u-subsection
										class="secordfloor"
										v-show="retail === 1"
										:list="RetailStatusList[1]"
										bgColor="#fff"
										active-color="#FBB000"
										@change="RetailStatusChange"
										:bold="false"
										:current="redetail"
									></u-subsection>
									<u-subsection
										class="secordfloor"
										v-show="retail === 2"
										:list="RetailStatusList[2]"
										bgColor="#fff"
										active-color="#FBB000"
										@change="RetailStatusChange"
										:bold="false"
										:current="redetail"
									></u-subsection>
									<!-- <u-subsection class='secordfloor' v-show="retail===3" :list="RetailStatusList[3]" bgColor='#fff' active-color="#FBB000" @change="RetailStatusChange" :bold='false' :current="redetail"></u-subsection> -->
								</view>
								<retailList
									v-if="current === 2"
									:oneTab="retail"
									:lastTab="redetail"
									:listType="goInPage"
									:datalist="retailOrderList"
									@handleOrder="handleOrder"
									@forcUpdata="forcUpdata"
								></retailList>
								<u-loadmore v-if="retailOrderList.length > 0" :status="loadStatus[loadStatusId]" bgColor="rbg(246,246,246)"></u-loadmore>
							</view>
						</scroll-view>
					</swiper-item>
				</swiper>
			
			</view>
			<view>
				<u-modal
					title="温馨提示"
					v-model="popup.show"
					class="popup"
					width="65%"
					:mask-close-able="true"
					:title-style="{ fontWeight: 'bold', fontSize: '36rpx', color: '#333333' }"
					:show-confirm-button="false"
				>
					<view class="slot-content">{{ popup.title }}</view>
					<view class="woxiangxbox">
						<button class="slot-contentbutto2" @click="popup.show = false" form-type="reset">取 消</button>
						<button class="slot-contentbutto" v-if="popup.val == 'del'" @click="DeleteOrderTask(popup.id)" form-type="reset">{{ popup.btnText }}</button>
						<button class="slot-contentbutto" v-else @click="confirmReceipt(popup.id)" form-type="reset">{{ popup.btnText }}</button>
					</view>
				</u-modal>
			</view>
		</view>
	</page-loading>
</template>
<script src="./orderAdmin.js"></script>

<style>
/* #ifndef H5 */
page {
	height: 100%;
	background-color: #f2f2f2;
}
/* #endif */
</style>

<style lang="scss" scoped>
@import './orderAdmin.scss';
</style>
